package com.company.task1;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class DeleteStudentInfo {

    public static void deleteFunction(List<ArrayList> studentList){

        if(0 == studentList.size()){
            System.out.println("系统中无学生信息，请选择增加选项增添学生信息！");
            return;
        }

        Scanner sc = new Scanner(System.in);
        int deleteIndex;

        System.out.println("您想删除第几个学生的信息：");
        deleteIndex = sc.nextInt();

        studentList.remove(deleteIndex-1);
    }
}
